#include<iostream>
using namespace std;
class Shape
{
	
};
class Rectangle:public Shape
{
	public:
		void setRectangle()
		{
			cout<<"Length:\n";
			cin>>length;
			cout<<"Width:"<<endl;
			cin>>width;
		}
		double getArea()
		{
			return length*width;
		}
		double length;
		double width;
};
class Circle:public Shape
{
	public:
		double radius;
		double getArea()
		{
			return radius*radius*3.14;
		}
		void setCircle()
		{
			cout<<"Radius:"<<endl;
			cin>>radius;
		}
};
class Square:public Rectangle
{
	public:
		void setSquare()
		{
			cout<<"Length:"<<endl;
			cin>>length;
			width=length;
		}
};
int main()
{
	Circle C_a;
	Rectangle R_a;
	Square S_a;
	C_a.setCircle();
	cout<<"Area="<<C_a.getArea()<<endl;
	R_a.setRectangle();
	cout<<"Area="<<R_a.getArea()<<endl;
	S_a.setSquare();
	cout<<"Area="<<S_a.getArea()<<endl;
	return 0;
}
